<p class="entity-table">
    <?= $this->Html->link("&laquo; nazad", "/location_reservations", array( 'escape' => false ))?>
    
    <span class="actions visible form button-set">
    <? if (!empty($data['LocationReservation']['id'])): ?>
    <? $entityId = $data['LocationReservation']['id'] ?>
    
        <?= $this->Form->button('Obriši', array(
            'class'   => 'delete',
            'onclick' => "if (confirm('Da li želite da obrišete rezervaciju?')){location.href = '/location_reservations/remove/{$entityId}'}"
        ))?>
    <? endif ?>
    </span>
</p>
<?= $this->Form->create('LocationReservation', array('url' => '/location_reservations/save')) ?>

    <?= $this->Form->hidden('id', array( 'value' => (int)@$data['LocationReservation']['id'])) ?>

    <p><?= $this->Form->label('location_id', 'Lokacija:') ?>
    <?= $this->Form->select('location_id', $locations, array( 'value' => @$data['LocationReservation']['location_id'], 'empty'=>false)) ?></p>
    
    <p><?= $this->Form->label('start', 'Od:') ?>
    <?= $this->Form->text('start', array( 'value' => @$data['LocationReservation']['start'], 'class'=>'datepicker', 'required'=>false)) ?>
    <?= $this->App->formError('start') ?>
    <?= $this->Form->label('end', 'Do:', array('class'=>'inline auto')) ?>
    <?= $this->Form->text('end', array( 'value' => @$data['LocationReservation']['end'], 'class'=>'datepicker', 'required'=>false)) ?>
    <?= $this->App->formError('end') ?></p>
    
    <p><?= $this->Form->label('client_id', 'Klijent:') ?>
    <?= $this->Form->select('client_id', $clients, array( 'value' => @$data['LocationReservation']['client_id'], 'empty'=>false)) ?></p>
    
    <?= $this->Form->button('Sačuvaj') ?>
<?= $this->Form->end() ?>
